package statickeyword;

public class SingletonLazy {
    private SingletonLazy(){
        System.out.println("调用了构造器");
    }

    private static SingletonLazy singletonLazy = null;

    public static SingletonLazy getInstance(){
        if (singletonLazy == null){
            singletonLazy = new SingletonLazy();
        }
        return singletonLazy;
    }
}
